package com.movie2.service.impl;

import com.movie2.model.entity.ManagerPassword;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Map;
import com.movie2.mapper.ManagerPasswordMapper;
import com.movie2.service.ManagerPasswordService;


/**
 * 
 * ManagerPasswordService业务逻辑操作接口类的实现类
 * 
 **/

@Service
@Transactional
@Slf4j
public class ManagerPasswordServiceImpl implements ManagerPasswordService{

	@Autowired
	ManagerPasswordMapper managerPasswordMapper;

	//查询（根据主键ID查询）
	public ManagerPassword  selectByPrimaryKey (Integer id){
		log.info("通过主键查询ManagerPassword信息:selectByPrimaryKey() ");
		return managerPasswordMapper.selectByPrimaryKey(id);
	}

	//查询（获得数据表中的数量）
	public int selectManagerPasswordCount(){
		log.info("获得ManagerPassword数量信息:selectManagerPasswordCount() ");
		return managerPasswordMapper.selectManagerPasswordCount();
	}

	//查询全部信息
	public List<ManagerPassword>  selectAllManagerPasswords ( ){
		log.info("获得全部ManagerPassword信息:selectAllManagerPasswords() ");
		return managerPasswordMapper.selectAllManagerPasswords ( );
	}

	//查询（根据其他条件查询需要的结果）

	public int selectManagerPasswordsCountByCondition(Map<String,Object> map){
		log.info("根据其他条件查询需要的ManagerPassword信息:selectManagerPasswordsCountByCondition() ");
		return managerPasswordMapper.selectManagerPasswordsCountByCondition(map);
	}

	//查询（通过Map条件，获得所有符合的信息）

	public List<ManagerPassword> selectManagerPasswordsCondition(Map<String,Object> map){
		log.info("根据其他条件查询需要的ManagerPassword信息:selectManagerPasswordsCountByCondition() ");
		return managerPasswordMapper.selectManagerPasswordsCondition(map);
	}

	//查询（通过条件进行分页查询）

	public List<ManagerPassword> selectManagerPasswordsPerPageByCondition(Map<String,Object> map){
		log.info("通过条件进行分页查询ManagerPassword信息:selectManagerPasswordsPerPageByCondition() ");
		return managerPasswordMapper.selectManagerPasswordsPerPageByCondition(map);
	}

	//条件查询
	public List<ManagerPassword>  selectManagerPasswordsByCondition (ManagerPassword record){
		log.info("通过传入的参数条件ManagerPassword信息进行查询:selectManagerPasswordsByCondition () ");
		return managerPasswordMapper.selectManagerPasswordsByCondition(record);
	}

	//删除（条件删除）
	public int deleteByCondition( ManagerPassword record ){
		log.info("根据传入的ManagerPassword信息，条件删除:deleteByCondition() ");
		return managerPasswordMapper.deleteByCondition(record);
	}

	//删除（根据主键ID删除）
	public int deleteByPrimaryKey (Integer id ){
		log.info("主键ID删除ManagerPassword信息:deleteByPrimaryKey() ");
		return managerPasswordMapper.deleteByPrimaryKey(id);
	}

	//添加
	public int insert( ManagerPassword record ){
		log.info("新增ManagerPassword信息:insert() ");
		return managerPasswordMapper.insert(record);
	}

	//添加 （匹配有值的字段）
	public int insertSelective( ManagerPassword record ){
		log.info("新增（匹配有值的字段）ManagerPassword信息:insertSelective() ");
		return managerPasswordMapper.insertSelective(record);
	}

	//修改 （匹配有值的字段）
	public int updateByPrimaryKeySelective( ManagerPassword record ){
		log.info("修改（匹配有值的字段）ManagerPassword信息:updateByPrimaryKeySelective() ");
		return managerPasswordMapper.updateByPrimaryKeySelective(record);
	}

	//修改（根据主键ID修改）
	public int updateByPrimaryKey ( ManagerPassword record ){
		log.info("修改ManagerPassword信息:updateByPrimaryKey() ");
		return managerPasswordMapper.updateByPrimaryKey(record);
	}

}